clc;
s=0;
m=0;
while(s<=10000),
    m=m+1;
    s=s+m;
end
s
m